import request from '@/utils/api';

// 获取与某用户的聊天历史（分页）
export const getChatHistory = (otherUserId, page = 1, pageSize = 20) => {
  return request.get('/api/chat/history', {
    params: { otherUserId, page, pageSize }
  });
};

// 获取当前用户未读消息总数
export const getUnreadChatCount = () => {
  return request.get('/api/chat/unread/count');
};

// 获取最近聊天列表（类似微信会话）
export const getRecentChatList = () => {
  return request.get('/api/chat/recent');
};